package com.decelo.jpa.kafka;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;
@Component
public class Consumer {
    private static Logger logger= LoggerFactory.getLogger(Consumer.class);
    /**
     * 监听seckill主题,有消息就读取
     * @param message
     */
    @KafkaListener(topics = {"test"})
    public void receiveMessage(String message){
        //收到通道的消息之后执行秒杀操作
        logger.info("11111");
    }
}
